package com.then.architecture.data.repository;

import android.arch.lifecycle.LiveData;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;

import com.then.architecture.AppExecutors;
import com.then.architecture.data.api.ApiResponse;

/**
 * Created by 42524 on 2018/2/26.
 */

public abstract class SimpleDBBoundResource<ResultType, RequestType> extends BoundResource<ResultType, RequestType> {

    public SimpleDBBoundResource(AppExecutors appExecutors) {
        super(appExecutors);
    }

    @Override
    protected void saveCallResult(@NonNull RequestType item) {

    }

    @Override
    protected boolean shouldFetch(@Nullable ResultType data) {
        return false;
    }

    @NonNull
    @Override
    protected abstract LiveData<ResultType> loadFromDb();

    @NonNull
    @Override
    protected LiveData<ApiResponse<RequestType>> createCall() {
        return null;
    }
}
